﻿using EnvDTE;
using EnvDTE80;
using Microsoft.VisualStudio.CommandBars;

namespace LazyPlugins.DeclarativeAddinCreator
{
    public class AddinCreatorContext
    {
        public AddinCreatorContext(DTE2 applicationObject, AddIn addInInstance, Commands2 commands, CommandBars bars, object tag)
        {
            this.applicationObject = applicationObject;
            this.addInInstance = addInInstance;
            this.commands = commands;
            this.bars = bars;
            Tag = tag;
        }

        public object Tag { get; set; }
        private readonly DTE2 applicationObject;
        private readonly AddIn addInInstance;
        private readonly Commands2 commands;
        private readonly CommandBars bars;

        public AddinCreatorContext(DTE2 applicationObject, AddIn addInInstance, Commands2 commands, CommandBars bars)
        {
            this.applicationObject = applicationObject;
            this.addInInstance = addInInstance;
            this.commands = commands;
            this.bars = bars;
        }

        public DTE2 ApplicationObject
        {
            get { return applicationObject; }
        }

        public AddIn AddInInstance
        {
            get { return addInInstance; }
        }

        public Commands2 Commands
        {
            get { return commands; }
        }

        public CommandBars Bars
        {
            get { return bars; }
        }

        public AddinCreatorContext Copy()
        {
            return new AddinCreatorContext(applicationObject, addInInstance, commands, bars, Tag);
        }
    }
}
